import request from '@/utils/request'

// 查询企业合伙人列表
export function listPartner(query) {
  return request({
    url: '/api/partner/business/list',
    method: 'get',
    params: query
  })
}

// 查询企业合伙人详细
export function getPartner(id) {
  return request({
    url: '/api/partner/business/' + id,
    method: 'get'
  })
}

// 新增企业合伙人
export function addPartner(data) {
  return request({
    url: '/api/business/partner',
    method: 'post',
    data: data
  })
}

// 修改企业合伙人
export function updatePartner(data) {
  return request({
    url: '/api/business/partner',
    method: 'put',
    data: data
  })
}

export function agreePartner(id) {
  return request({
    url: '/api/partner/business/agree/'+ id,
    method: 'get'
  })
}

export function refusePartner(id) {
  return request({
    url: '/api/partner/business/refuse/'+ id,
    method: 'get'
  })
}


// 删除企业合伙人
export function delPartner(id) {
  return request({
    url: '/api/partner/business/' + id,
    method: 'delete'
  })
}
